#!  python
# -*- coding: UTF-8 -*-
'''
@Author ：Star
@Date ：2022/11/4  
'''
from base_page import BasePage
from selenium.webdriver.common.by import By
from time import sleep


class NewsPage(BasePage):
    __url = "http://news.baidu.com/"
    __input = (By.CSS_SELECTOR, "#ww")
    __searchBtn = (By.CSS_SELECTOR, "#s_btn_wr")

    def openNewsPage(self):
        self.driver.get(self.__url)

    def input_sectext(self, sec_text):
        self.find_element(*self.__input).send_keys(sec_text)

    def click_searchBtn(self):
        self.find_element(*self.__searchBtn).click()

    def get_titleText(self):
        return self.driver.title

